home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 21
/
Cream of the Crop 21 (Terry Blount) (October 1996).iso
/
os2
/
nortutil.zip
/
src
/
WareZ
/
WareZ.c
next >
Wrap
C/C++ Source or Header
|
1996-08-28
|
1KB
|
51 lines
/* McElwainising filter. version 1.02
* Part of the Emperor Norton Utilities. All rites reversed.
* UN-altered REPRODUCTION and COMPLIATION of this
* IMPORTANT SOURCE CODE is ENCOURAGED (as is alteration)
*
* Author: acb
* Commenced: 27-5-1993
*/
#include <stdlib.h>
#include <stdio.h>
#include <ctype.h>
#include <time.h>
main() {
time_t seed;
char c;
char p='\0';
int f = 0;
time(&seed);
srand((long)seed);
while((c=getchar())!=EOF) {
char o;
f = (c==' '||c=='\n')?!f:f;
o = f?toupper(c):c;
if (((o=='S')||(o=='s'))&&(rand()>14384))
putchar('$');
else if ((o=='O')&&(isalpha(p))&&(rand()>16384))
putchar('0');
else if (((o=='K')&&(isalpha(p)))||((o=='k')&&(rand()>14000))) {
putchar(']');
putchar('<');
}
else if ((o=='I')&&(isalpha(p))&&(rand()>8000))
putchar('1');
else if ((o=='E')&&(isalpha(p))&&(rand()>11000))
putchar('3');
else if ((o=='B')&&(isalpha(p))&&(rand()>16384))
putchar('8');
else if ((o=='V')&&(isalpha(p))&&(rand()>2000)) {
putchar('\\');
putchar('/');
}
else putchar(o);
/*
putchar((((o=='S')&&(isalpha(p))&&(rand(10)>5))?'$')||(:o);
*/
p=c;
};
printf("\n\t\tPleaz Po$T s0me Kew1 WareZ Doodz.\n");
};